Skip to main content

Inheritance in Data Modeling

Overview

One of the key features in Bizagi is how the Work Portal empowers knowledge workers with everything they need to make informed decisions while providing flexibility and support for processes that are unstructured due to their high rate of unpredictability or dynamism.

For detailed information on these features and overall concepts, refer to Experience Design.

Within the new features leveraging possibilities for knowledge workers, Bizagi introduces inheritance in data modeling.


What is Inheritance?

Similarly to the concept in Object-oriented programming (or database generalization/specialization concepts), inheritance allows you to break down definitions of your objects in terms of "sets."

For entity-type objects, you define a base entity (analogous to a superclass) from which other entities derive (analogous to subclasses).
Deriving implies that such new entities automatically inherit the properties of the base entity while also being able to extend those properties.

Examples of Inheritance:

  • A car, boat, airplane, or train are all means of transportation. These inherit general transportation concepts but have their own differences.
  • Birds, mammals, reptiles, or fish are all animals. General animal characteristics are inherited by all of them.

You can define an inheritance model in a cascade, where base entities derive from other entities.

For example, in a hospital's emergency room, a Doctor stakeholder may request exams for a patient while diagnosing them.
The Exam entity serves as a base entity, from which specific types of exams (e.g., blood tests, electrocardiograms, X-rays, pregnancy tests) derive.

Inheritance_00


Advantages of Inheritance in Bizagi

When designing your data model, regarding stakeholder entities or any master entity (not applicable to virtualized entities), you can rely on inheritance to optimize attribute definitions for better maintainability.

Key Benefits:

  1. Reduced Maintenance:
    Derived entities share attributes and actions defined for the base entity, so changes or additions only need to be made at the base entity.

  2. Polymorphism:
    Polymorphism allows a new special control to handle derived entities, providing maximum flexibility and adaptability to new entities.


Defining Inheritance

  1. Go into the Expert View and click Entities.
  2. Create or locate an entity that derives from a base entity and right-click it to select Advanced properties.

Inheritance_01

  1. Go to the Inheritance tab and select the Base entity from which the current entity extends.
    In this case, the Laboratory entity extends from Available exams.

Inheritance_02

  1. Click OK to save changes.

Verifying the Configuration

You can verify inheritance using the following options:

  1. Browse Attributes:
    Inherited attributes appear as read-only. To modify these, you must change them in the base entity.

    Inheritance_03

  2. Show Heritage Option:
    Right-click the entity and select Show heritage to view a diagram illustrating the inheritance.

    Inheritance_04

    Attributes and actions displayed in gray are inherited from base entities.
    For example, Blood test extends from Laboratory, which extends from Available exams.

    Inheritance_05

  3. Children Tab:
    View all entities extending from the selected entity in this tab (e.g., entities extending from Laboratory).

    Inheritance_15


Using Inherited Entities in Processes

Once an inherited entity is created, you can use its attributes in expressions as normal attributes.

Inheritance_16

Considerations:

  • Bizagi does not show a dependency between the inherited entity and the parent entity's attributes in expressions.

    Inheritance_17

  • If the base entity has relationships with other entities, these relationships will not appear for the inherited entity.

    Inheritance_18


Polymorphism and Inheritance in Execution

Polymorphism allows many shapes, enabling Bizagi to handle and create new records for derived entities based on the base entity definition.

Polymorphic Launcher:

Bizagi includes a special control for forms, called the Polymorphic Launcher, which smartly creates new instances of derived entities.
This ensures agility and flexibility during implementation, as new derived entities can be added without altering forms.

For detailed information about this concept, refer to Polymorphism and Constructors.


Exam icons: Medical Icon Set.